package Lab2.Exc3;

public class Person {
    private String name;
    private String address;
    private String phone;
    private String email;

    public Person(String name) {
        this.name = name;
    }

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Class: Person, name: " + name;
    }

    public static void main(String[] args) {
        Person test = new Student("Daniel", "fifth grade");
        Person p = new Person("person");
        Person s = new Student("student", "Junior");
        Person e = new Employee("employee");
        Person f = new Faculty("faculty");
        Person staff = new Staff("staff");

        Person[] list = {p, s, e, f, staff};
        for (Person a : list) {
            System.out.println(a);
        }
    }
}
